package com.oig.auth.api;

import com.oig.auth.api.factory.PermissionFallbackFactory;
import com.oig.sys.auth.vo.PermissionVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(contextId = "permissionService", value = "sys-auth-server",path = "/permission", fallbackFactory = PermissionFallbackFactory.class)
public interface PermissionService {

    /**
     * 获取用户权限
     * @param userId 用户id
     */
    @PostMapping(value = "/loadPermission/{userId}")
    List<PermissionVo> loadPermissionByUserId(@PathVariable("userId") Integer userId);

}
